<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:c="http://java.sun.com/jsp/jstl/core"
	xmlns:forgeview="http://jboss.org/forge/view"	
	template="/resources/scaffold/pageTemplate.xhtml">

	<f:metadata>
		<f:viewParam name="id" value="#{sysCompanyNewsBean.id}"/>
		<f:event type="preRenderView" listener="#{sysCompanyNewsBean.retrieve}"/>
	</f:metadata>

	<ui:param name="pageTitle" value="Create Sys Company News"/>

	<ui:define name="header">
		Sys Company News
	</ui:define>

	<ui:define name="subheader">
		<c:choose>
			<c:when test="#{!empty sysCompanyNewsBean.id}">
				Edit existing Sys Company News
			</c:when>
			<c:otherwise>
				Create a new Sys Company News
			</c:otherwise>
		</c:choose>
	</ui:define>

	<ui:define name="footer"/>

	<ui:define name="main">
		<h:form id="create">
			<h:messages globalOnly="true" styleClass="error"/>

			<h:panelGrid columnClasses="label,component,required" columns="3">
				<h:outputLabel for="sysCompanyNewsBeanSysCompanyNewsComNewsNo" value="Com News No:"/>
				<h:panelGroup>
					<h:inputText id="sysCompanyNewsBeanSysCompanyNewsComNewsNo" required="true" value="#{sysCompanyNewsBean.sysCompanyNews.comNewsNo}"/>
					<h:message for="sysCompanyNewsBeanSysCompanyNewsComNewsNo" styleClass="error"/>
				</h:panelGroup>
				<h:outputText value="*"/>
				<h:outputLabel for="sysCompanyNewsBeanSysCompanyNewsHrEmp" value="Hr Emp:"/>
				<h:panelGroup>
					<h:selectOneMenu converter="#{hrEmpBean.converter}" id="sysCompanyNewsBeanSysCompanyNewsHrEmp" value="#{sysCompanyNewsBean.sysCompanyNews.hrEmp}">
						<f:selectItem/>
						<f:selectItems itemLabel="#{forgeview:display(_item)}" itemValue="#{_item}" value="#{hrEmpBean.all}" var="_item"/>
					</h:selectOneMenu>
					<h:message for="sysCompanyNewsBeanSysCompanyNewsHrEmp" styleClass="error"/>
				</h:panelGroup>
				<h:outputText/>
				<h:outputLabel for="sysCompanyNewsBeanSysCompanyNewsSysCompany" value="Sys Company:"/>
				<h:panelGroup>
					<h:selectOneMenu converter="#{sysCompanyBean.converter}" id="sysCompanyNewsBeanSysCompanyNewsSysCompany" value="#{sysCompanyNewsBean.sysCompanyNews.sysCompany}">
						<f:selectItem/>
						<f:selectItems itemLabel="#{forgeview:display(_item)}" itemValue="#{_item}" value="#{sysCompanyBean.all}" var="_item"/>
					</h:selectOneMenu>
					<h:message for="sysCompanyNewsBeanSysCompanyNewsSysCompany" styleClass="error"/>
				</h:panelGroup>
				<h:outputText/>
				<h:outputLabel for="sysCompanyNewsBeanSysCompanyNewsComNewsDtm" value="Com News Dtm:"/>
				<h:panelGroup>
					<h:inputText id="sysCompanyNewsBeanSysCompanyNewsComNewsDtm" maxLength="19" value="#{sysCompanyNewsBean.sysCompanyNews.comNewsDtm}">
						<f:convertDateTime pattern="MMM d, yyyy hh:mm:ss a" type="both"/>
					</h:inputText>
					<h:message for="sysCompanyNewsBeanSysCompanyNewsComNewsDtm" styleClass="error"/>
				</h:panelGroup>
				<h:outputText/>
				<h:outputLabel for="sysCompanyNewsBeanSysCompanyNewsComNewsCreatedDtm" value="Com News Created Dtm:"/>
				<h:panelGroup>
					<h:inputText id="sysCompanyNewsBeanSysCompanyNewsComNewsCreatedDtm" maxLength="19" value="#{sysCompanyNewsBean.sysCompanyNews.comNewsCreatedDtm}">
						<f:convertDateTime pattern="MMM d, yyyy hh:mm:ss a" type="both"/>
					</h:inputText>
					<h:message for="sysCompanyNewsBeanSysCompanyNewsComNewsCreatedDtm" styleClass="error"/>
				</h:panelGroup>
				<h:outputText/>
				<h:outputLabel for="sysCompanyNewsBeanSysCompanyNewsComNewsHeader" value="Com News Header:"/>
				<h:panelGroup>
					<h:inputText id="sysCompanyNewsBeanSysCompanyNewsComNewsHeader" maxLength="300" value="#{sysCompanyNewsBean.sysCompanyNews.comNewsHeader}"/>
					<h:message for="sysCompanyNewsBeanSysCompanyNewsComNewsHeader" styleClass="error"/>
				</h:panelGroup>
				<h:outputText/>
				<h:outputLabel for="sysCompanyNewsBeanSysCompanyNewsComNewsDetail" value="Com News Detail:"/>
				<h:panelGroup>
					<h:inputText id="sysCompanyNewsBeanSysCompanyNewsComNewsDetail" maxLength="1000" value="#{sysCompanyNewsBean.sysCompanyNews.comNewsDetail}"/>
					<h:message for="sysCompanyNewsBeanSysCompanyNewsComNewsDetail" styleClass="error"/>
				</h:panelGroup>
				<h:outputText/>
			</h:panelGrid>

			<div class="buttons">
				<h:commandLink value="Save" action="#{sysCompanyNewsBean.update}" styleClass="btn btn-primary"/>
				<c:choose>
					<c:when test="#{!empty sysCompanyNewsBean.id}">
						<h:link value="Cancel" outcome="view" styleClass="btn btn-primary">
							<f:param name="id" value="#{sysCompanyNewsBean.id}"/>
						</h:link>
						<h:commandLink value="Delete" action="#{sysCompanyNewsBean.delete}" styleClass="btn btn-primary"/>
					</c:when>
					<c:otherwise>
						<h:link value="Cancel" outcome="search" styleClass="btn btn-primary"/>
					</c:otherwise>
				</c:choose>
			</div>
		</h:form>
	</ui:define>

</ui:composition>